package com.tosit.driverschool.service;

import com.tosit.driverschool.common.entity.SetType;
import com.tosit.driverschool.dao.SetTypeMapper;
import com.tosit.driverschool.dao.SetTypeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SetTypeServiceImpl implements SetTypeService {

    @Autowired
    SetTypeRepository setTypeRepository;
    @Autowired
    SetTypeMapper setTypeMapper;

    @Override
    public Integer add(SetType setType) {
        SetType save = setTypeRepository.save(setType);
        return save.getId();
    }

    @Override
    public Integer findId(SetType setType) {
        Integer id = setTypeMapper.findId(setType);
        return id;
    }
}
